package Graphics;

public class Edge<T> {
	private int weight;
	private T verName;

	{
		verName = null;
	}

	Edge(T verName) {
		this.verName = verName;
	}	
	
	Edge(T verName,int weight) {
		setWeight(weight);
		this.verName = verName;
	}

	public void setWeight(int weight) {
		this.weight = weight;
	}

	public int getWeight() {
		return this.weight;
	}
	
	public T getVerName(){
		return this.verName;
	}
	
	void setVerName(T verName){
		this.verName=verName;
	}

	@Override
	public boolean equals(Object object){
		@SuppressWarnings("unchecked")
		Edge<T> bEdge=(Edge<T>)object;

		if (this.verName.equals(bEdge.getVerName())){
			return true;
		}
		return false;
	}

}
